All Questions
Tagged with cachingapi-design
7 questions
0votes
0answers
31views
API design for precomputation cache [closed]
In my numeric code library I have a function totient_sum that depends on an expensive one-time precomputation totsum_range = [...], then different calls to totient_sum(n) are quick. There are several ...
-2votes
1answer
370views
Recommended way of caching weather information
I'm developing an application that will show some weather information based on the user's location. Since the weather forecast is just a very small feature of the app that complements the main ones, I ...
3votes
1answer
208views
Design that hides cache as an implementation detail
I have a type which is fairly heavy (maintains an off-heap object), and which can be uniquely derived from a String. It requires cleanup, so of course the type has a close() method, but it is used in ...
2votes
2answers
718views
How to cache duplicate fetch and save calls that are fired within the same second
I have a service which provides an endpoint that fetches from another service, saves, and returns an record. Here are the details: The caller calls the endpoint using an identifier (say a customer's ...
-1votes
1answer
432views
Reducing duplicate API call between micro services in a latency sensitive flow
Let's suppose that I have 5 microservices, let's also name them ServiceA, ServiceB, ServiceC, ServiceD, ServiceE. To perform an operation X communication needs to happen between these services. And ...
5votes
1answer
1kviews
API design and storing custom queries from Db to cache
I was thinking about how people actually implement utilising results from a cache before a doing database lookup. When designing an API, should there always be a manual check to the cache first before ...
4votes
1answer
1kviews
API Caching Layer
Primer: We have a mobile app being served by an API (written in PHP). The main point of the app is to display products from a large items table in the database, in a multitude of different ...